Repository navigation
feat(atlas): aggregator embed-at-promotion — staged unit to core scan shard (#1518, #5669) - #10832
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What
The staging aggregator's embed-at-promotion step (#5669 aggregator slice; the sequenced remainder of #1518 after the definition in #10350 and the item writer in #10788):
atlas_core::aggregate::embed_unit_into_shard— reads one staging unit'sitems+chunks_raw, embeds every chunk document-side with the mandated model, writes one new local core scan shard (atlas-core-<tier>-<topic>-<nn>.dbwith the exactchunks/ vec-table /atlas_manifestschema shard discovery and the fan-out scan already read), stamps the unit DB'satlas_manifestembedding_model, and promotes the unit throughRegistry::promote— whose M6 gate (atlas: embed pipeline and staging promotion assert the mandated embedding model (#6060 M6) #7648, now closed) re-reads the stamp. No new read path: promoted entries are searchable by the existing fan-out.DocEmbedder(embed.rs) — the document-side twin ofQueryEmbedder: prompt-free, stored as produced, per the corpus contract in embed.rs's module docs.AtlasEmbedder::embed_doc_raw+FixedDocEmbedderincluded.atlas-stage promoteCLI verb — production wiring: builds the real embedder with the same model/ORT resolution as the atlas-search binary (ATLAS_MODEL_DIR / ATLAS_ORT_LIB, state-dir / HF-cache snapshots), loud failure when absent.shareable/personal/secret-bearing, the inverse ofTierCeiling::from_sensitivity), so an internal unit's chunks are admitted under the default personal ceiling.Failure shape: embed/write failures before the stamp remove any partial shard and leave the unit open; the stamp closes the staging DB to further
stage_artifactwrites (exact v1 table-set check), matching merge-on-close.Tests
crates/atlas-core/tests/aggregate.rs(3 tests): promotion of a staged unit (DNS config + prose) into a shard thatopen_from_spec("dir:…")discovers andfanout_scanranks correctly (DNS chunk first for a DNS-shaped query); the registry gate refuses before the aggregator runs; empty-unit and second-run refusals; tier→sensitivity mapping.cargo test -p atlas-core -p atlas-search: all green (126 lib tests + every integration suite, incl. the 3 new ones).cargo fmtapplied to the touched files only.Remaining on #1518 (recorded, sequenced)
Live promotion run against the real model + retrieval proof on #1518, shard-size benchmarks, and closing/linking #2469 — landing in the same task 17164 shift as follow-on steps after this PR merges (promotion needs the merged verb).
Refs #1518, #5669. Part of task 17164.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.